package com.group7.mall.convert;

import com.group7.mall.dto.CommentDiscussionDto;
import com.group7.mall.req.UserAddCommentRequest;
import com.group7.mall.dto.UserCommentDto;
import com.group7.mall.entity.TbCommentDiscussion;
import com.group7.mall.entity.TbUserComment;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface CommentConverter {

    CommentConverter INSTANCE = Mappers.getMapper(CommentConverter.class);

    TbUserComment convertUserAddCommentRequestToTbUserComment(UserAddCommentRequest userAddCommentRequest);

    List<UserCommentDto> convertTbUserCommentListToUserCommentDtoList(List<TbUserComment> tbUserCommentList);

    UserCommentDto convertTbUserCommentToUserCommentDto(TbUserComment tbUserComment);

    UserCommentDto convertTbCommentDiscussionToUserCommentDto(TbCommentDiscussion tbCommentDiscussion);

    CommentDiscussionDto convertTbCommentDiscussionToCommentDiscussionDto(TbCommentDiscussion tbCommentDiscussion);
}
